﻿<?xml version="1.0" encoding="utf-8" ?>
<log4net>
  <appender name="main" type="log4net.Appender.RollingFileAppender">
    <file value="BMS.Manager.Entry.Trace.log" />
    <appendToFile value="true" />
    <maximumFileSize value="10MB" />
    <maxSizeRollBackups value="2" />

    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%d [%t] %-5p %c [%x] [%X{auth}] - %m%n"/>
    </layout>
  </appender>

  <appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
    <mapping>
      <level value="DEBUG" />
      <foreColor value="White" />
      <backColor value="Green" />
    </mapping>
    <mapping>
      <level value="INFO" />
      <foreColor value="Blue" />
      <backColor value="White" />
    </mapping>
    <mapping>
      <level value="WARN" />
      <foreColor value="Yellow" />
      <backColor value="White" />
    </mapping>
    <mapping>
      <level value="ERROR" />
      <foreColor value="Red" />
      <backColor value="White" />
    </mapping>

    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%d %level %logger - %message%newline" />
    </layout>
  </appender>

  <root>
    <level value="ALL" />
    <appender-ref ref="main" />
    <appender-ref ref="ColoredConsoleAppender" />
  </root>

</log4net>